const mongoose = require('./db.js');//引入数据库连接模块

const Schema = mongoose.Schema;//拿到数据库对应的集合对象

const cartSchema = new Schema({
    userid:{type:String},
    cartid:{type:String},
    proid: {type: String },
    proname: { type: String },
    price: { type: Number }, // 价格
    proimg: { type: String },
    num: { type: Number },
    kindid:{type:String},
    data: {
        picPath: { type: String },
        label: { type: String },
        Drugname: { type: String },
        grain:{ type: String },
        price: { type: String },
        classifyThirdCode: { type: String },
        company: { type: String },
        SalesVolume: { type: String },
        kindid:{type:String}
    }
})//设计用户集合的字段以及数据类型


module.exports = mongoose.model('Cart', cartSchema);
  